Optimal. Leaf size=31 \[ \frac{x^2}{2}-\frac{\sin ^2(x)}{4}+\frac{3 \cos ^2(x)}{4}+2 x \sin (x) \cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0412594, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 3, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.375, Rules used = {4431, 3310, 30} \[ \frac{x^2}{2}-\frac{\sin ^2(x)}{4}+\frac{3 \cos ^2(x)}{4}+2 x \sin (x) \cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4431
Rule 3310
Rule 30
Rubi steps
\begin{align*} \int x \csc (x) \sin (3 x) \, dx &=\int \left (3 x \cos ^2(x)-x \sin ^2(x)\right ) \, dx\\ &=3 \int x \cos ^2(x) \, dx-\int x \sin ^2(x) \, dx\\ &=\frac{3 \cos ^2(x)}{4}+2 x \cos (x) \sin (x)-\frac{\sin ^2(x)}{4}-\frac{\int x \, dx}{2}+\frac{3 \int x \, dx}{2}\\ &=\frac{x^2}{2}+\frac{3 \cos ^2(x)}{4}+2 x \cos (x) \sin (x)-\frac{\sin ^2(x)}{4}\\ \end{align*}
Mathematica [A] time = 0.0152247, size = 22, normalized size = 0.71 \[ \frac{x^2}{2}+x \sin (2 x)+\frac{1}{2} \cos (2 x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.048, size = 26, normalized size = 0.8 \begin{align*} 4\,x \left ( 1/2\,\cos \left ( x \right ) \sin \left ( x \right ) +x/2 \right ) -{\frac{3\,{x}^{2}}{2}}- \left ( \sin \left ( x \right ) \right ) ^{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.990269, size = 24, normalized size = 0.77 \begin{align*} \frac{1}{2} \, x^{2} + x \sin \left (2 \, x\right ) + \frac{1}{2} \, \cos \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.518457, size = 54, normalized size = 1.74 \begin{align*} 2 \, x \cos \left (x\right ) \sin \left (x\right ) + \frac{1}{2} \, x^{2} + \cos \left (x\right )^{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 6.2343, size = 37, normalized size = 1.19 \begin{align*} - x^{2} \sin ^{2}{\left (x \right )} - x^{2} \cos ^{2}{\left (x \right )} + \frac{3 x^{2}}{2} + 2 x \sin{\left (x \right )} \cos{\left (x \right )} - \sin ^{2}{\left (x \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14296, size = 24, normalized size = 0.77 \begin{align*} \frac{1}{2} \, x^{2} + x \sin \left (2 \, x\right ) + \frac{1}{2} \, \cos \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]